#include <iostream>
using namespace std;

// 已知
string d;

// 未知


int main()
{
    cin>>d;
    if(d=="N") cout<<"S";
    else if(d=="S") cout<<"N";
    else if(d=="W") cout<<"E";
    else if(d=="E") cout<<"W";
    else if(d=="NE") cout<<"SW";
    else if(d=="NW") cout<<"SE";
    else if(d=="SE") cout<<"NW";
    else if(d=="SW") cout<<"NE";
    return 0;
}